package com.blrs.service.website.impl;

import java.sql.Timestamp;
import java.util.*;

import com.blrs.common.utils.SecurityUtils;
import com.blrs.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.blrs.mapper.WebsiteManagementMapper;
import com.blrs.domain.WebsiteManagement;
import com.blrs.service.website.IWebsiteManagementService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-25
 */
@Service
public class WebsiteManagementServiceImpl implements IWebsiteManagementService 
{
    @Autowired
    private WebsiteManagementMapper websiteManagementMapper;
    @Autowired
    private ISysDeptService sysDeptService;
    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public WebsiteManagement selectWebsiteManagementById(String id)
    {
        return websiteManagementMapper.selectWebsiteManagementById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param websiteManagement 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<WebsiteManagement> selectWebsiteManagementList(WebsiteManagement websiteManagement)
    {
        return websiteManagementMapper.selectWebsiteManagementList(websiteManagement);
    }

    @Override
    public List selectWebsiteCommonListOne(WebsiteManagement websiteManagement) {
        List<WebsiteManagement> websiteManagements  = websiteManagementMapper.selectWebsiteCommonListOne(websiteManagement);
        List<Object> list = new ArrayList<>();
        Map<String,Object> map = new HashMap<>();
        map.put("listitem",websiteManagements);
        list.add(map);
        return list;
    }

    @Override
    public List selectWebsiteCommonListTwo(WebsiteManagement websiteManagement) {
        List<WebsiteManagement> websiteManagements  = websiteManagementMapper.selectWebsiteCommonListTwo(websiteManagement);
        List<Object> list = new ArrayList<>();
        Map<String,Object> map = new HashMap<>();
        map.put("listitem",websiteManagements);
        list.add(map);
        return list;
    }

    @Override
    public List selectWebsiteCommonListThree(WebsiteManagement websiteManagement) {
        List<WebsiteManagement> websiteManagements  = websiteManagementMapper.selectWebsiteCommonListThree(websiteManagement);
        List<Object> list = new ArrayList<>();
        Map<String,Object> map = new HashMap<>();
        map.put("listitem",websiteManagements);
        list.add(map);
        return list;
    }

    @Override
    public List selectWebsiteAllList(WebsiteManagement websiteManagement) {
        List<WebsiteManagement> websiteManagements  = websiteManagementMapper.selectWebsiteManagementList(websiteManagement);
        List<Object> list = new ArrayList<>();
        Map<String,Object> map = new HashMap<>();
        map.put("listitem",websiteManagements);
        list.add(map);
        return list;
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param websiteManagement 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertWebsiteManagement(WebsiteManagement websiteManagement)
    {
        websiteManagement.setCreationId(SecurityUtils.getUserId());
        websiteManagement.setCreationName(SecurityUtils.getUsername());
        websiteManagement.setCreationTime(new Timestamp(new Date().getTime()));
        websiteManagement.setPublisherId(SecurityUtils.getOrgId());
        websiteManagement.setPublisherName(SecurityUtils.getOrgName());
        return websiteManagementMapper.insertWebsiteManagement(websiteManagement);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param websiteManagement 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateWebsiteManagement(WebsiteManagement websiteManagement)
    {
        return websiteManagementMapper.updateWebsiteManagement(websiteManagement);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteWebsiteManagementByIds(String[] ids)
    {
        return websiteManagementMapper.deleteWebsiteManagementByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteWebsiteManagementById(String id)
    {
        return websiteManagementMapper.deleteWebsiteManagementById(id);
    }
}
